<#assign ctx="${rc.contextPath}">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<title></title>
		<style type="text/css">
			body {
				margin-left: 0px;
				margin-top: 0px;
				background-image: url('${ctx}/images/seach_4.gif');
			}
		</style>
		<link href="${ctx}/css/common.css" rel="stylesheet" type="text/css">
		<script type="text/javascript" src="${ctx}/js/jquery-1.4.4.min.js"></script>
	</head>

	<body>
		<div align="center">
	<form method="post" action="${ctx}/return/tuifangchaxun.htm" id="tuifangchaxun">
	<input type="hidden" name="pageNo" value="1">
	<input type="hidden" name="pageSize" value="20">
  <table width="100%" height=100% border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td height=25 id=location ><div align="left"><img src="${ctx}/images/location_arrow.gif" width="8" height="11" align="absmiddle"> 
          您的位置：购房/租房&gt;&gt; 退房信息&gt;&gt; 查询退房信息</div></td>
    </tr>
    <tr>
      <td valign="top" ><div>
     
            <tr>
              <td align="right">
                <TABLE width="100%" border="0" align="center" cellpadding="2" cellspacing="2">
                  <TBODY>
                  <TR>
                                  <TD align="right" >产权管理单位</TD>
                                  <TD align="left"> <SELECT name="group_id" id="group_id" size="1", style="width:210px" onchange="setbuildlist(this)">
									   <option selected value="">全部</option>
									   <#if groupList??>
									   		<#list groupList as group>
									   			<option value="${group.group_id!""}"> ${group.group_name!""} </option>
	                    					</#list>
									   </#if>
											 </SELECT>	
                                    </TD>
                                  <TD align="right" >楼信息</TD>
                                  <TD align="left" ><SELECT name="build_id" id="select-louleixing" size="1", style="width:210px" onchange="setroomlist(this)">
                                    <option selected value="">全部</option>
                                  </SELECT></TD>
                                </TR>
                                <TR>
                                <TD align="right" >房信息</TD>
                                  <TD align="left" ><SELECT name="room_id" id="room_id" size="1", style="width:210px">
                                    <option selected value="">全部</option>
                                  </SELECT></TD>
                           	     <TD align="right" >退房申请审批情况</TD>
                           	     <TD align="left" ><SELECT name="check_status" size="1", style="width:210px">
				                   <option selected value=""> 全部 </option>
								      <option value="9">  已入库</option>
									  <option value="1"> 未通过 </option>
									 <option value="0"> 未审批 </option>
						               </SELECT></TD>
                         	     </TR>
                   <TR>
                                  <TD align="right" >姓名</TD>
                                  <TD align="left" ><INPUT type="text" name="return_name" id="return_name" class="input-text" style="width:200px" size="20">
                                    </TD>
                                  <TD align="right" > 身份证号　</TD>
                                  <TD align="left" ><INPUT type="text" name="id_card" id="id_card" class="input-text" style="width:200px" size="20">
</TD>
                                </TR>
                                <TR>
                                  <TD align="right" >工作单位全称</TD>
                                  <TD align="left" colspan="3"><INPUT type="text" name="comp_name" id="comp_name" class="input-text" style="width:730px" size="20">
（支持模糊查询）</TD>
                                </TR>
                  </TBODY>
              </TABLE></td>
            </tr>
          </table>   
      </div>
      </td>
    </tr>
	    <tr>
      <td height=25 id=operation>
        <div align="right"> </div></td>
    </tr>
  </table>
  <!-- 查询结束-->
  <table width="100%" height=100% border="0" cellspacing="0" cellpadding="0">
    <tr>
      
    <td height=25 align="right" id=operation >
<input name="Submit2" type="button" class="input-button" value="查 询" onClick="tuifangchaxun()" >
      <img src="${ctx}/images/line.gif" width="5" height="15" align="absmiddle">       <input name="Submit222" type="button" class="input-button" value="重 填" onclick="resetttttt()">
      &nbsp;&nbsp;&nbsp; </td>
    </tr>
   
    <tr>
      
    </tr>
  </table>
	</form>
</div>
	</body>
	<script>
		function tuifangchaxun() {
			$('#tuifangchaxun').submit();
		}
		
		function resetttttt() {
			$('#return_name').val('');
			$('#id_card').val('');
			$('#comp_name').val('');
		}
		
		function setbuildlist(select) {
			var id = select.value;
			
			if (id == '') {
				var tempoption = '<option selected value=""> 全部 </option>';
			    $('#select-louleixing').html(tempoption);
			    $('#room_id').html(tempoption);
				return;
			}
			
			
			var url = "${ctx}/buy/getBuildList/"+id+".htm";
			var buildsoptions = '<option selected value="">全部</option>';
			var roomsoptions = '<option selected value="">全部</option>';
			$.ajax({
			  type: "POST",
			  url: url,
			   success: function(map){
			   var builds = [];
			   var roomsfffff = [];
			   if (map.buildList) {
			   	   var builds = map.buildList;
			   }
			   if (map.roomList) {
			   	   roomsfffff = map.roomList;
			   }
			   	  var builds = map.buildList;
			     for (var i = 0; i < builds.length; i++) {
			     		buildsoptions += '<option value="' + builds[i].build_id + '">' + builds[i].house_estate + '-' + builds[i].build_no + '</option>';
			     }
			   	  
			     for (var i = 0; i < roomsfffff.length; i++) {
			     		roomsoptions += '<option value="' + roomsfffff[i].room_id + '">' + roomsfffff[i].room_unit + '-' + roomsfffff[i].room_no + '</option>';
			     }
			     $('#select-louleixing').html(buildsoptions);
			     $('#room_id').html(roomsoptions);
			   }

			});
		}
		
		function setroomlist(select) {
			var id = select.value;
			var options = '<option selected value="">全部</option>';
			$.ajax({
			  type: "POST",
			  url: "${ctx}/buy/getRoomList/"+id+".htm",
			   success: function(list){
			     for (var i = 0; i < list.length; i++) {
			     		options += '<option value="' + list[i].room_id + '">' + list[i].room_unit + '-' + list[i].room_no + '</option>';
			     }
			     $('#room_id').html(options);
			   }

			});
		}
	</script>
</html>